import api  from "./index";
import {axios} from '@/utils/request'


export function login(parameter) {
  return axios({
      url:'/auth/login',
      method:'post',
      data:parameter
  })
}

export  function getSmsCaptcha(parameter) {
return axios({
    url:api.SendSms,
    method: 'post',
    data: parameter
})
}


export  function  getInfo() {
return axios({
    url:'/user/info',
    method:'get',
    headers:{
        'Content-Type':'application/json;charset=UTF-8'
    }
})
}


export function getCurrentUserNav(token) {
return axios({
    url:'/user/nav',
    method:'get'
})
}

export  function logout() {
return axios({
    url:'/auth/logout',
    method:'post',
    headers: {
        'Content-Type':'application/json;charset=UTF-8'
    }
})
}


export function get2step(parameter) {
return axios({
    url:api.twoStepCode,
    method:'post',
    data:parameter
})
}